<?php
$times = 100000;
$lowBound = 1;		
$upBound = 10;

// create an array 
$stat = array_fill($lowBound, $upBound, 0);
echo ("Created array and its size is  " .count($stat). "\n");

// generate random number and fill into array
for ($i = 0; $i < $times; $i++) {
	$stat[mt_rand($lowBound, $upBound)] ++;
}  

// print out statisic 
foreach ($stat as $key => $value) {
	echo $key .": " .$value ."\t". ($value/$times) ."\n";
}

// check sum
echo "sum: ". array_sum($stat);



?>


